<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>云笔记</title>
</head>
<body>
<form action="/note/" method="post">
    <h4>
    {{ uname }}的笔记
    <a href="/note/add/">添加笔记</a>
    <a href="/">返回首页</a>
    </h4>

    <table>
        <thead>
        {% if notes %}
        <tr>
            <th>编号</th>
            <th>标题</th>
            <th>创建时间</th>
            <th>修改时间</th>
            <th>修改</th>
            <th>删除</th>
        </tr>
        {% endif %}
        </thead>
        <tbody>
            {% for note in notes %}
            <tr>
                <th>{{ note.id }}</th>
                <th><a href="/note/mod/{{ note.id }}">{{ note.title }}</a></th>
                <th>{{ note.created_time }}</th>
                <th>{{ note.updated_time }}</th>
                <th>
                    <a href="/note/mod/{{ note.id }}">修改</a>
                </th>
                <th>
                    <a href="/note/del/{{ note.id }}">删除</a>
                </th>
            </tr>
            {% empty %}
            <tr>
                <td colspan="6">您还未撰写笔记,请先去撰写笔记</td>
            </tr>
         {% endfor %}
        </tbody>
    </table>

</form>
</body>
</html>